﻿import {Component, OnInit} from '@angular/core';

@Component({
  selector:'products', // <products> </products>
  templateUrl:'./products.component.html',
  styleUrl:'products.component.css'
})
export class ProductsComponent  {

  productId :number = 1;
  stockStatus :string ='Yes';
  getStockStatus(){
    return this.stockStatus;
  }

  addProduct = true;
  addProductStatus = 'No product added!';
  greeting="click the button";
  enteredValue ="hello world";
  constructor() {
    setTimeout(()=>{
      this.addProduct= false;
    },4000)
  }
  onClick(){
    this.addProductStatus ='Product added';
  }

  onUpdateProductName(event:any){
      console.log(event);
  }
}
